#!/usr/bin/env python
# -*- encoding: utf-8 -*-

from datetime import datetime
import  time

CHECK_POINT_LOCATION = {1:{"x":17,"y":119},2:{"x":23,"y":80},3:{"x":46,"y":66},4:{"x":60,"y":48},5:{"x":79,"y":42},6:{"x":114,"y":12},7:{"x":132,"y":24},8:{"x":100,"y":60},9:{"x":66,"y":78},10:{"x":59,"y":107}}

def get_nat_btl_location(check_point, step):
    location_0 = {}
    location_1 = {}
    if check_point == 10:
        location_0 = CHECK_POINT_LOCATION[check_point]
        location_1 = CHECK_POINT_LOCATION[1]
    else:
        location_0 = CHECK_POINT_LOCATION[check_point]
        location_1 = CHECK_POINT_LOCATION[check_point+1]
    x_l = -(location_0['x'] - location_1['x'] ) / 5.0 * step
    y_l = -(location_0['y'] - location_1['y'] ) / 5.0 * step
    
    return {
            'x':location_0['x']+x_l,
            'y':location_0['y']+y_l,
            }

if __name__ == "__main__":
    btl_time_list=({"battle_place_id":1},{"battle_place_id":1},{"battle_place_id":2})
    t = []
#     for bt in btl_time_list:
#         if bt['battle_place_id'] == 2:
#             t.append(bt)
#     
    t += (bt for bt in btl_time_list if bt['battle_place_id'] == 2)
    print btl_time_list
    print t
    
    print 14+9+11+17+16+13+12+13+16+10+10+10+15

